﻿<Window x:Class="Program.wpfAdatok"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="wpfAdatok" Height="376" Width="628" WindowStartupLocation="CenterScreen" Style="{DynamicResource WindowTemplate}">
    <Grid>
        <DataGrid Name="dgAdatok" ColumnHeaderStyle="{DynamicResource DataGridHeaderTemplate}" Style="{DynamicResource DataGridTemplate}" CellStyle="{DynamicResource DataGridCellStyle}" Height="308" />
    </Grid>
    
    <Window.Resources>
        <!--DataGrid cellák stílusa-->
        <Style x:Key="DataGridCellTemplate" TargetType="DataGridCell">
            <Style.Triggers>
                <Trigger Property="IsSelected" Value="True">
                    <Setter Property="Background" Value="Yellow"/>
                    <Setter Property="BorderBrush" Value="Yellow"/>
                    <Setter Property="Foreground" Value="Black" />
                </Trigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="DataGridTemplate" TargetType="DataGrid">
            <Style.Setters>
                <Setter Property="Opacity" Value="0.8"/>
                <Setter Property="AlternatingRowBackground" Value="LightGray"/>
                <Setter Property="SelectionUnit" Value="FullRow"/>
                <Setter Property="GridLinesVisibility" Value="None"/>
                <Setter Property="AutoGenerateColumns" Value="False"/>
                <Setter Property="CanUserAddRows" Value="True"/>
                <Setter Property="CanUserDeleteRows" Value="True"/>
                <Setter Property="VerticalAlignment" Value="Top"/>
            </Style.Setters>
        </Style>

        <Style x:Key="DataGridHeaderTemplate" TargetType="DataGridColumnHeader">
            <Setter Property="FontWeight" Value="Bold"/>
        </Style>
        
        <Style x:Key="WindowTemplate" TargetType="Window">
            <Setter Property="ResizeMode" Value="CanMinimize"></Setter>
        </Style>
        
    </Window.Resources>
</Window>
